package com.atguigu.spzx.feign.orderInfo;

import com.atguigu.spzx.model.entity.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * ClassName: OrderInfoFeignClient
 * Package: com.atguigu.spzx.feign.orderInfo
 * Description:
 *
 * @Author 刘强
 * @Create 2024/7/21 9:28
 * @Version 1.0
 */
@FeignClient("service-order")
public interface OrderInfoFeignClient {
    /**
     * 保存订单日志
     * @param orderId
     * @param processStatus
     */
    @GetMapping("saveOrderLog/{orderId}/{processStatus}")
    public void saveOrderLog(@PathVariable Long orderId,
                             @PathVariable Integer processStatus);

    /**
     *  更新订单状态
     * @param orderStatus
     */
    @GetMapping("updateOrderStatus/{orderStatus}")
    public void updateOrderStatus(@PathVariable Integer orderStatus);
    /**
     * 根据订单编号查询订单信息
     * @param orderNo
     * @return
     */
    @GetMapping("/api/order/orderInfo/auth/getByOrderNo/{orderNo}")
    public OrderInfo getByOrderNo(@PathVariable String orderNo);
}
